#pragma once

#include <vgraph>
#include "IWindow.h"
#include "Formtypes.h"

interface IPane;
delegate Delegate<bool(IObject* /*sender*/,PaneCreateEventArgs* /*e*/)> BeingCreatedEventHandler;
delegate Delegate<void(IObject* /*sender*/,UpdateEventArgs* /*e*/)> BeingUpdatedEventHandler;

interface IPane : public IWindow
{
	DEFINE_IID(IID_Pane)

	event_declare(BeingCreatedEventHandler,BeingCreated);
	event_declare(BeingUpdatedEventHandler,BeingUpdated);

	virtual void SetDockinfo(dockAction action,IPane* neighbor) = 0;
	virtual void SetID(uint32 id) = 0;
	virtual uint32 GetID() const = 0;
	virtual void Setvisible(bool visible=true) = 0;
	virtual bool Isvisible() const = 0;
	virtual void SetSize(const Size& size) = 0;
	virtual const Size& GetSize() const = 0;
	virtual void WatchObjects(viid subjectIID, viid interestedObjectIID) = 0;
	virtual void UnwatchObjects(viid subjectIID, viid interestedObjectIID) = 0;

	/*for inner usage*/
	virtual void GetDockinfo(dockAction& dock,IPane*& neighbor) const = 0;
};

